package com.guigu.guliproduct.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guigu.guliproduct.entity.ProductAttrValue;
import com.guigu.guliproduct.entity.bo.SpuItemAttrGroupBo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * spu属性值 Mapper 接口
 * </p>
 *
 * @author 陈俊杰
 * @since 2024-07-13
 */
@Mapper
public interface ProductAttrValueMapper extends BaseMapper<ProductAttrValue> {
    /**
     * 根据spuId和catelogId获取spu的属性组和属性值
     *
     * @param spuId     商品id
     * @param catelogId 商品三级分类id
     * @return 属性组和属性值
     */
    List<SpuItemAttrGroupBo> getGroupWithAttrBySpuId(@Param("spuId") Long spuId, @Param("catelogId") Long catelogId);


}
